Q.scene("Title",function(stage) {
	// Titre
/*
	http://www.commentcamarche.net/forum/affich-3892494-bordures-de-texte-en-html-css
*/
	// Suite
	var container2 = null;
	var text_zone = stage.insert(
		new Q.UI.Text({
			x:Q.width/2-140,
			y: Q.height/2-20,
			label: "Ghetto de Todrul-city",
			color: "white",// "#F3F781",
			size: 24,
			vx: 20
		})
	);
	var text_zone2 = stage.insert(
		new Q.UI.Text({
			x:Q.width/2+120,
			y: Q.height/2+20,
			label: "Quartier des Olivettes, batiment C, 5ème étage",
			color: "white",// "#F4FA58",
			size: 18,
			vx: 40
		})
	);
	text_zone.step = function(dt) {
		if (text_zone.p.x > Q.width/2-130 && text_zone.p.vx >=0.4) {
			text_zone.p.vx-=dt*(text_zone.p.vx);
			text_zone2.p.vx-=dt*(text_zone2.p.vx);
		}
		text_zone.p.x += dt*text_zone.p.vx;
		text_zone2.p.x -= dt*text_zone2.p.vx;
		if (text_zone.p.vx < 0.4) text_zone.p.vx = text_zone2.p.vx = 0;
		if (text_zone.p.vx < 10 && container2 == null) {
			container2 = stage.insert(new Q.UI.Container({
				x: Q.width/2,
				y: Q.height-30,
				fill: "rgba(255,255,255,0.8)",
				border: 1
			}));
			var text = container2.insert(
				new Q.UI.Text({
					x:0,
					y: 0,
					label: 	'Appuie sur espace pour commencer...',
					color: "black",
					size: 12,
					align: 'center'
				})
			);
			container2.fit(10, 10);
		}
	};

});

Q.scene("BTitle",function(stage) {
	stage.insert(new Q.Repeater({ asset: "night.png", speedX: 0, speedY: 0, y:0 }));
	stage.insert(new Q.Repeater({ asset: "t3.png", speedX: 0.2, speedY: 0.2, y:0 }));
	stage.insert(new Q.Repeater({ asset: "t2.png", speedX: 0.4, speedY: 0.4, y:0 }));
	stage.insert(new Q.Repeater({ asset: "t1.png", speedX: 0.8, speedY: 0.8, y:0 }));
	var void_s = stage.insert(new Q.Sprite({asset:'void.png', x: Q.width/2, y: Q.height/2, vx: 50}));
	void_s.step = function(dt) {this.p.x += dt*this.p.vx;};
	stage.add("viewport").follow(void_s);
	Q.input.on('fire',stage,function(e) {
		Q.clearStage(1);
		Q.stageScene("firstPlace",0);
	});
});